package com.shaozi.nc.web.biz;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shaozi.nc.data.mongodao.GroupMemberRelationMDao;
import com.shaozi.nc.web.beans.GetChatGroupMemberReqBean;
import com.shaozi.nc.web.biz.base.BaseBizImpl;
import com.shaozi.lib.core.ActionRetBean;
import com.shaozi.lib.throwable.SzException;

@Service("bizChatGroup")
public class ChatGroupBiz extends BaseBizImpl {

	private final Logger logger = Logger.getLogger(ChatGroupBiz.class);
	@Autowired
	private GroupMemberRelationMDao groupMemberRelationMDao;

	public ChatGroupBiz() {

	}

	public void getChatGroupMembers(ActionRetBean retBean, GetChatGroupMemberReqBean reqBean) {
		try {
			retBean.setEntity(groupMemberRelationMDao.getMemberUids(reqBean.getCompany_id(), reqBean.getGroup_id()));
		} catch (SzException e) {
			logger.warn(SzException.getStackMessage(e));
		}
	}
}
